﻿/***********************************************************************************************
 * 
 * ProjectName: WMSSoft.Lib.WinKStart
 * 
 * Description: Is a Abstract basis class for Property - changing used from all Model Classes
 * 
 * Created:     18.09.2015
 * 
 * Author:      matthias wagler - matthias@WMSSoft.de
 * 
 * Copyright:   Copyright 2015 by WMSSoft.net
 * 
 * License:     GPLv3
 * 
 * History:     18.09.2015 - matthias wagler matthias@WMSSoft.de   -   Created
 * 
 **********************************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;
using System.Runtime.CompilerServices;

namespace WMSSoft.Lib.WinKStart.Abstract
{
    public abstract class CModelBase : INotifyPropertyChanged
    {
        /// <summary>
        /// will raised if a property has been changed
        /// </summary>
        public event PropertyChangedEventHandler PropertyChanged = delegate { };

        /// <summary>
        /// NOtify that named property has been changed
        /// </summary>
        /// <param name="sPropertyName">name of the changed property</param>
        protected virtual void OnPropertyChanged([CallerMemberName]string sPropertyName = null)
        {
            PropertyChanged(this, new PropertyChangedEventArgs(sPropertyName));
        }


    }
}
